package noema.dataModel;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;

@Entity
public class LongEntity implements Serializable{
	@Transient
	private static final long serialVersionUID = 1L;
	@Id
	private long longValue;
	
	public LongEntity() {
		super();
	}

	public LongEntity(long longValue) {
		super();
		this.longValue = longValue;
	}

	public long getLongValue() {
		return longValue;
	}

	public void setLongValue(long longValue) {
		this.longValue = longValue;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (longValue ^ (longValue >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LongEntity other = (LongEntity) obj;
		if (longValue != other.longValue)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return ""+longValue;
	}	
}